﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Rem.Objects.Forms
{
    public delegate void FormOperationHandler(Form f);
    
    public class FormsCollection : List<Form>
    {
        public event FormOperationHandler FormAdded;
        public event FormOperationHandler FormRemoved;

        public new void Add(Form f)
        {
            base.Add(f);
            if (FormAdded != null)
                FormAdded(f);
        }
        public new bool Remove(Form f)
        {
            
            if (FormRemoved != null)
                FormRemoved(f);
            return base.Remove(f);
        }
    }
}
